package com.black.cat.jvm.classfile.constantpool.impl;


import com.black.cat.jvm.classfile.ClassReader;
import com.black.cat.jvm.classfile.constantpool.BaseConstantInfo;
import com.black.cat.jvm.classfile.constantpool.ConstantInfo;
import com.black.cat.jvm.common.CommonValue;

/**
 * @Author blackcat
 * @create 2021/8/12 20:41
 * @version: 1.0
 * @description:浮点型字面量
 *
 * CONSTANT_Float_info {
 * u1 tag;
 * u4 bytes;
 * }
 */
public class ConstantInfoFloat extends BaseConstantInfo implements ConstantInfo {

    public ConstantInfoFloat(ClassReader reader) {
        value = reader.nextU4ToFloat() + "";// u4
    }

    @Override
    public int getTag() {
        return CommonValue.CONSTANT_POOL_TAG_FLOAT;
    }

}
